<template>
  <div>

    <el-card class="box-card">
      <medical_liyi>
      </medical_liyi>
    </el-card>
    <div v-if="otherLiyiModel.accidental">
      <div class="space20">
      </div>
      <el-card class="box-card">
        <div slot="header" class="card-heaer">
          <span style="line-height: 36px;">意外伤害责任利益表</span>

        </div>
        <other_liyi :model="otherLiyiModel.accidental">
        </other_liyi>
      </el-card>
    </div>
    <div v-if="otherLiyiModel.emergency">
      <div class="space20">
      </div>
      <el-card class="box-card">
        <div slot="header" class="card-heaer">
          <span style="line-height: 36px;">全球紧急救援责任利益表</span>

        </div>
        <other_liyi :model="otherLiyiModel.emergency">
        </other_liyi>
      </el-card>
    </div>
    <div v-if="otherLiyiModel.study">
      <div class="space20">
      </div>
      <el-card class="box-card">
        <div slot="header" class="card-heaer">
          <span style="line-height: 36px;">学业中断责任利益表</span>

        </div>
        <other_liyi :model="otherLiyiModel.study">
        </other_liyi>
      </el-card>
    </div>
    <div v-if="otherLiyiModel.travel">
      <div class="space20">
      </div>
      <el-card class="box-card">
        <div slot="header" class="card-heaer">
          <span style="line-height: 36px;">旅行不便责任利益表</span>

        </div>
        <other_liyi :model="otherLiyiModel.travel">
        </other_liyi>
      </el-card>
    </div>
    <div v-if="otherLiyiModel.other">
      <div class="space20">
      </div>
      <el-card class="box-card">
        <div slot="header" class="card-heaer">
          <span style="line-height: 36px;">个人第三者责任利益表</span>
        </div>
        <other_liyi :model="otherLiyiModel.other">
        </other_liyi>
      </el-card>
    </div>
  </div>
</template>
<script>
import medicalLiyi from '@/components/Report/userLiyi/medical';
import otherLiyi from '@/components/Report/userLiyi/other';
export default {
  data() {
    return {
      otherLiyiModel: ''

    }
  },
  components: {
    'medical_liyi': medicalLiyi,
    'other_liyi': otherLiyi
  },
  activated() {
      this.otherLiyiModel = {
        accidental: '',
        emergency:'',
        study:'',
        travel: '',
        other: ''

      }
    this.$http.get("Interest_OrderOther/liyi?id=" + this.$route.query["saleno"]+"&pno="+this.$route.query["pno"]).then(response => {
      var data = response.body;

      if (data.code == 1) {
        this.otherLiyiModel = data.result[0];
       
      } else {
        this.$notify.error({
          title: '失败',
          message: '数据获取失败'
        });
      }
    }, response => {
      this.$notify.error({
        title: '网络错误',
        message: '网络错误'
      });
      this.loding = false;
    });
  }



}
</script>
